/*
 * DesktopApplication1.java
 */
package com.catosist.run.application.desktopapplication;

import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;
import org.pushingpixels.substance.api.SubstanceLookAndFeel;
import org.pushingpixels.substance.api.skin.CremeSkin;
import org.pushingpixels.substance.api.skin.SubstanceCremeLookAndFeel;

/**
 * The main class of the application.
 */
public class DesktopApplication extends SingleFrameApplication {

    /**
     * At startup create and show the main frame of the application.
     */
    @Override
    protected void startup() {
//        Check check = new Check();
//        check.setVisible(true);
        SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                try {
                    SubstanceLookAndFeel.setSkin(new CremeSkin());
//                    UIManager!.setLookAndFeel(new SubstanceCremeLookAndFeel());
                } catch (Exception e) {
                    System.out.println("Substance Graphite failed to initialize");
                }
            }
        });
        show(new DesktopApplicationView(this));
    }

    /**
     * This method is to initialize the specified window by injecting resources.
     * Windows shown in our application come fully initialized from the GUI
     * builder, so this additional configuration is not needed.
     */
    @Override
    protected void configureWindow(java.awt.Window root) {
    }

    /**
     * A convenient static getter for the application instance.
     * @return the instance of DesktopApplication1
     */
    public static DesktopApplication getApplication() {
        return Application.getInstance(DesktopApplication.class);
    }

    /**
     * Main method launching the application.
     */
    public static void main(String[] args) {
        launch(DesktopApplication.class, args);
    }
}
